/**
 * Created by Administrator on 2015/12/22.
 */
var Promise = require('promise');
var logger = require('log4js').getLogger('newsService');
var comm = require('../../utils/commonUtils');
var mailUtil = require('../../utils/mail');
var qrcodeDao = require('../dao/QrcodeDao')
var qrcodeService = {};

qrcodeService.getQrcode = function () {
    return qrcodeDao.getByParams({},'id').then(function (qrcodes) {
        if(qrcodes&&qrcodes.length>0){
            return Promise.resolve(qrcodes[0]);
        }else{
            return Promise.resolve(null);
        }
    })
}

module.exports = qrcodeService;
